<template>

  <div class="swiper-container">
    <swiper
      direction="vertical"
      :slidesPerView="3"
      :spaceBetween="0"
      :centeredSlides="true"
      :slidesOffsetBefore="0"
      :slidesOffsetAfter="0"
      class="mySwiper"
    >
      <swiper-slide>
        <card-basic chartId="0101-01" v-slot="{ getVal }" header="卡片标题" style="height: 100%;">
          <my-chart style="flex: 1" chartId="0101-01" :params="{year: '2023'}" :data="getVal()"></my-chart>
        </card-basic>
      </swiper-slide>
      <!--<swiper-slide>
        <chart chartId="0101-01"></chart>
      </swiper-slide>-->
      <!--<swiper-slide>
        <h3>卡片</h3>
        <my-chart style="flex: 1" chartId="0101-02" :params="{year: '2023'}" :data="{a: 1, b: 2}"></my-chart>
      </swiper-slide>-->
      <swiper-slide>Slide 4</swiper-slide>
      <swiper-slide>Slide 5</swiper-slide>
      <swiper-slide>Slide 6</swiper-slide>
      <swiper-slide>Slide 7</swiper-slide>
      <swiper-slide>Slide 8</swiper-slide>
      <swiper-slide>Slide 9</swiper-slide>
    </swiper>
  </div>

</template>
<script setup>

  import MyChart from '@/components/common/MyChart.vue'
  import CardBasic from '@/components/commom/CardBasic.vue'

  // import chart from '@/components/eCharts.vue'
  import { Swiper, SwiperSlide } from 'swiper/vue';
  import 'swiper/css';

  /*export default {
    components: {
      MyChart,
      Swiper,
      SwiperSlide,
      chart
    },
    setup() {
      return {

      };
    },
  };*/
</script>

<style lang="scss" scoped>


.swiper-container {
  overflow: hidden;
  width: 100vw;
  height: calc(100vh - 44px);
}

.swiper {
  width: 100vw;
  height: calc(200vh - 44px);
  margin-top: -50vh;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  width: 100vw;
  height: 300px;

  display: flex;
  flex-direction: column;
  //justify-content: center;
  //align-items: center;

  transition: 300ms;
  transform: scale(0.85);
}
.swiper-slide-active,.swiper-slide-duplicate-active{
  transform: scale(1);
}



// .swiper-slide:nth-child(1n) {
//   background-color: #f3eac5;
// }

// .swiper-slide:nth-child(2n) {
//   background-color: rgb(0, 140, 255);
// }

// .swiper-slide:nth-child(3n) {
//   background-color: rgb(10, 184, 111);
// }

// .swiper-slide:nth-child(4n) {
//   background-color: rgb(211, 122, 7);
// }

// .swiper-slide:nth-child(5n) {
//   background-color: rgb(118, 163, 12);
// }

// .swiper-slide:nth-child(6n) {
//   background-color: rgb(180, 10, 47);
// }

// .swiper-slide:nth-child(7n) {
//   background-color: rgb(35, 99, 19);
// }

// .swiper-slide:nth-child(8n) {
//   background-color: rgb(0, 68, 255);
// }

// .swiper-slide:nth-child(9n) {
//   background-color: rgb(218, 12, 218);
// }

.swiper-slide:nth-child(10n) {
  background-color: rgb(54, 94, 77);
}
</style>
